import paddlehub as hub
# from docarray import DocumentArray, Document

def run(text_prompt, style):
    ernie_vlig_module = hub.Module(name='ernie_vilg')
    result = ernie_vlig_module.generate_image(text_prompt=text_prompt, style=style, top_k=6, output_dir='./output')


if __name__ == '__main__':
    text_prompt, style = '雪山', '写实'
    run(text_prompt, style)


"""
报错：
AssertionError: Please go to the wenxin official website to apply for AK and SK and set the parameters “ak” and “sk” correctly, or set the environment variables “WENXIN_AK” and “WENXIN_SK”.
"""